//
//  HouseLoanModel.h
//  SourceCodeRead
//
//  Created by Kael on 2018/7/1.
//  Copyright © 2018年 Kael. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, RepayMentMethod) {
    RepayMentMethodEqualPrincipal,
    RepayMentMethodEqualInterest,
};

@interface HouseLoanModel : NSObject

#pragma mark - **************** 输入

/** 总价 */
@property (nonatomic, strong) NSNumber *totalPrice;

/** 首付 比例 一般30%起 */
@property (nonatomic, strong) NSNumber *downPaymentRatio;

/** 首付金额 */
@property (nonatomic, strong) NSNumber *downPaymentPrice;

/** 贷款总额度 */
@property (nonatomic, strong) NSNumber *loanAmount;

/** 按揭年数 */
@property (nonatomic, strong) NSNumber *mortgageYears;

/** 利息 */
@property (nonatomic, strong) NSNumber *interest;

/** 还款方式 等额本金 或者 等额本息 */
@property (nonatomic, assign) RepayMentMethod repaymentMethod;



#pragma mark - **************** 输出

/** 总支付利息 */
@property (nonatomic, assign) NSNumber *interestAmount;

/** 首月供 */
@property (nonatomic, strong) NSNumber *firstMonthPayment;

/** 每月递减 */
@property (nonatomic, strong) NSNumber *dedreaseOfMonth;

/** 每月还款总金额 */
@property (nonatomic, strong) NSMutableArray *monthRepaymentsArr;

/** 每月还利息 */
@property (nonatomic, strong) NSMutableArray *monthInterestsArr;

/** 每月本金 */
@property (nonatomic, strong) NSMutableArray *monthPrincipalsArr;

/** 剩余金额 */
@property (nonatomic, strong) NSMutableArray *monthRemainingsArr;




#pragma mark - **************** 方法

/**
 设置属性

 @param totalPrice 房屋总金额
 @param loanAmount 贷款总额度
 @param mortgageYears 按揭年数
 @param interest 利息
 @param repaymentMethod 还款方式
 */
-(void)setPropsTotalPrice:(NSNumber *)totalPrice loanAmount:(NSNumber *)loanAmount mortgageYears:(NSNumber *)mortgageYears interest:(NSNumber *)interest repaymentMethod:(RepayMentMethod)repaymentMethod;


/** 计算 【计算后才会有输出结果】 */
-(void)calculateProps;













@end
